#include <stdio.h>
#include <time.h>

int main(){
    time_t now;
    time(&now);
    puts(ctime(&now));
    time_t time1,time2;
    time1=mktime(gmtime(&now));
    time2=mktime(localtime(&now));
    double gap1,gap2,gap3;
    gap1=difftime(time1,now);
    gap2=difftime(time2,now);
    gap3=difftime(time2,time1);
    printf("%lf %lf %lf\n",gap1,gap2,gap3);
    char timestr[100];
    strftime(timestr,100,"%Y-%m-%d %H:%M:%S",gmtime(&now));
    puts(timestr);
    strftime(timestr,100,"%Y-%m-%d %H:%M:%S",localtime(&now));
    puts(timestr);
    return 0;
}
